<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if(!class_exists('PC_controller')){
	class PC_controller extends CI_Controller {

		public function __construct(){
			parent::__construct();
			$this->load->model('Appmodel','m_app');
			$this->load->model('Footimagemodel','m_foot_image');
			$this->load->model('Customermodel','m_customer');
			$this->load->model('Productmodel','m_product');
			$this->load->model('Seriesmodel','m_series');
			$this->load->model('Shoppingcartmodel','m_shoppingcart');
		}

		public function index() {
		}

		public function download($file=''){
			if(empty($file)) show_error(404);
			$file = urldecode($file);
			$file = str_replace('..', '', $file);
			$file = UPLOAD_PATH.$file;
			if(!file_exists($file)) die('file not found!');
			header('Content-type:application/octet-stream');
			header('Content-Disposition:attachment;filename="'.basename($file).'"');
			header("Content-Length:".filesize($file));
			readfile($file);
		}

	}

}

/* End of file pc_controller.php */
/* Location: ./application/controllers/pc_controller.php */